Skip to content

Conversation

@emiliocuestaf
Copy link
Contributor

@emiliocuestaf emiliocuestaf commented Jan 7, 2026

Context:

  • ReturnCode is a class to handle return codes in dev-utils
  • ReturnCodeValue is an enum defined inside ReturnCode, thus it is also in dev-utils
  • ReturnCode_t is an enum containing return codes defined in fastdds

Adding comparison operator useful in switch or if else code blocks. Currently, the comparisons of the type

ReturnCode A == ReturnCode::RETCODE_X (This is actually of type ReturnCodeValue)

are implicitly calling the constructor

ReturnCode::ReturnCode(const fastdds::dds::ReturnCode_t& value)

for the right operand of the equality.

This can lead to issues since that constructor is not designed for variables of the type ReturnCodeValue but it is still called since both enums fall back to integers.

A new constructor from type ReturnCodeValue has been added to mitigate this issue

These are the artifacts generated using this patch on eprosimaCI:

Note they all use the suffix "_devutils_retcode_patch"

These are the CI's of the tools that depend on DevUtils running over those artifacts

@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.08%. Comparing base (f67337a) to head (5c8e486).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #146      +/-   ##
==========================================
- Coverage   60.43%   60.08%   -0.36%     
==========================================
  Files          65       65              
  Lines        1921     1924       +3     
  Branches      543      543              
==========================================
- Hits         1161     1156       -5     
- Misses        440      449       +9     
+ Partials      320      319       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Emilio Cuesta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants